Skip to content

Conversation

@vporpo
Copy link
Contributor

@vporpo vporpo commented Dec 13, 2024

This patch changes the visibility of the constructors of CatchSwitchInst ResumeInst and SwitchInst to private instead of public. This is similar to all other Sandbox IR instructions. The constructor is private to force the user go through the Context create* API.

The issue was exposed by: #119824

This patch changes the visibility of the constructors of CatchSwitchInst
ResumeInst and SwitchInst to private instead of public.
This is similar to all other Sandbox IR instructions. The constructor
is private to force the user go through the Context create* API.

The issue was exposed by: llvm#119824
Copy link
Contributor

@kazutakahirata kazutakahirata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@vporpo vporpo merged commit 27d09e6 into llvm:main Dec 13, 2024
8 of 10 checks passed
@github-actions
Copy link

github-actions bot commented Jun 5, 2025

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff HEAD~1 HEAD --extensions h,cpp -- llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.h llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.cpp
View the diff from clang-format here.
diff --git a/llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.cpp b/llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.cpp
index 9c9a30324..86dbd2171 100644
--- a/llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.cpp
+++ b/llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.cpp
@@ -479,7 +479,8 @@ Value *BottomUpVec::emitVectors() {
   return NewVec;
 }
 
-bool BottomUpVec::tryVectorize(ArrayRef<Value *> Bndl, LegalityAnalysis &Legality) {
+bool BottomUpVec::tryVectorize(ArrayRef<Value *> Bndl,
+                               LegalityAnalysis &Legality) {
   Change = false;
   if (LLVM_UNLIKELY(BottomUpInvocationCnt++ >= StopAt &&
                     StopAt != StopAtDisabled))

@github-actions
Copy link

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff HEAD~1 HEAD --extensions h,cpp -- llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/SeedCollector.h llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/SeedCollection.cpp llvm/lib/Transforms/Vectorize/SandboxVectorizer/SeedCollector.cpp llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SeedCollectorTest.cpp
View the diff from clang-format here.
diff --git a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/SeedCollector.h b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/SeedCollector.h
index 5e09c6ab1..ec7035069 100644
--- a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/SeedCollector.h
+++ b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/SeedCollector.h
@@ -307,8 +307,8 @@ class SeedCollector {
   }
 
 public:
-
-  LLVM_ABI SeedCollector(BasicBlock *BB, ScalarEvolution &SE, bool CollectStores, bool CollectLoads);
+  LLVM_ABI SeedCollector(BasicBlock *BB, ScalarEvolution &SE,
+                         bool CollectStores, bool CollectLoads);
   LLVM_ABI ~SeedCollector();
 
   iterator_range<SeedContainer::iterator> getStoreSeeds() {

@github-actions
Copy link

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff HEAD~1 HEAD --extensions cpp,h -- llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/SeedCollector.h llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/SeedCollection.cpp llvm/lib/Transforms/Vectorize/SandboxVectorizer/SeedCollector.cpp llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SeedCollectorTest.cpp
View the diff from clang-format here.
diff --git a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/SeedCollector.h b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/SeedCollector.h
index 5e09c6ab1..ec7035069 100644
--- a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/SeedCollector.h
+++ b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/SeedCollector.h
@@ -307,8 +307,8 @@ class SeedCollector {
   }
 
 public:
-
-  LLVM_ABI SeedCollector(BasicBlock *BB, ScalarEvolution &SE, bool CollectStores, bool CollectLoads);
+  LLVM_ABI SeedCollector(BasicBlock *BB, ScalarEvolution &SE,
+                         bool CollectStores, bool CollectLoads);
   LLVM_ABI ~SeedCollector();
 
   iterator_range<SeedContainer::iterator> getStoreSeeds() {

@github-actions
Copy link

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff HEAD~1 HEAD --extensions h,cpp -- llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/SeedCollector.h llvm/lib/Transforms/Vectorize/SandboxVectorizer/SeedCollector.cpp llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SeedCollectorTest.cpp
View the diff from clang-format here.
diff --git a/llvm/lib/Transforms/Vectorize/SandboxVectorizer/SeedCollector.cpp b/llvm/lib/Transforms/Vectorize/SandboxVectorizer/SeedCollector.cpp
index 815dda38b..e80dc04e1 100644
--- a/llvm/lib/Transforms/Vectorize/SandboxVectorizer/SeedCollector.cpp
+++ b/llvm/lib/Transforms/Vectorize/SandboxVectorizer/SeedCollector.cpp
@@ -122,7 +122,8 @@ void SeedContainer::insert(LoadOrStoreT *LSI, bool AllowDiffTypes) {
 }
 
 // Explicit instantiations
-template LLVM_EXPORT_TEMPLATE void SeedContainer::insert<LoadInst>(LoadInst *, bool);
+template LLVM_EXPORT_TEMPLATE void SeedContainer::insert<LoadInst>(LoadInst *,
+                                                                   bool);
 template LLVM_EXPORT_TEMPLATE void SeedContainer::insert<StoreInst>(StoreInst *,
                                                                     bool);
 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants